package cn.tuling;

public class ClassAdapterTest {
    public static void main(String[] args) {
        TargetInterface adapter = new Adapter();

        adapter.request();
    }
}


class Adaptee {

    public void specificRequest() {
        System.out.println("适配者类被调用。");
    }

}

interface TargetInterface {
    void request();
}

class Adapter extends Adaptee implements TargetInterface {

    @Override
    public void request() {
        specificRequest();
    }
}